package test1;

public class Student {
    private String name;
    private int age;
    private String id;
    public String score;

    public Student() {
    }

    public Student(String name, int age, String id) {
        this.name = name;
        this.age = age;
        this.id = id;
    }

    public Student(String name,int age, String id, String score) {
        this.name = name;
        this.age = age;
        this.id = id;
        this.score = score;
    }

    public Student(String score) {
        this.score = score;
    }

    public void eat(String name){
        System.out.println("今天"+name+"吃了一顿大餐!");
    }
    public void eat(){
        System.out.println("今天吃了一顿饭");
    }
    public static void staticMethod(){
        System.out.println("我是静态方法");
    }

    private void privateMethod(){
        System.out.println("我是私有成员方法");
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

 /*   public Integer getAge() {
        return age;
    }

    public void setAge(Integer age) {
        this.age = age;
    }
*/
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                ", id='" + id + '\'' +
                ", score='" + score + '\'' +
                '}';
    }
}
